<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<%     
	String path = request.getContextPath();     
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";     
%>  
<head>
<base href="<%=basePath%>" />
<title>登录</title>
<script type="text/javascript" src="<%=basePath%>js/jquery-1.8.3.min.js"></script>
<style type="text/css">
	body {TEXT-ALIGN: center;}
	.input{width: 120px;}
}
</style>
<script type="text/javascript">
	
	function login() {
		var username = $("#username").val();
		var password = $("#password").val();
		if(username==''){
			alert("请输入用户名");
			$("#username").focus();
			return;
		}
		if(password==''){
			alert("请输入密码");
			$("#password").focus();
			return;
		}
		$.post("<%=basePath%>manage/login", {username:username,password:password}, function(data) {
			var result=eval("("+data+")");
			if(result.code == 1) {
				location.href = "<%=basePath%>manage/etl?act=getPage";
			} else {
				alert(result.message);
				$("#password").val(null);
				$("#password").focus();
			}
		});

	}
</script>
</head>
<body>
	<div>
		<form action="<%=basePath%>manage/login" method="post">
			<table>
				<tr>
					<td>用户名:</td>
					<td><input type="text" name="username" id="username" value="appetl" class="input" /></td>
				</tr>
				<tr>
					<td>密&nbsp;&nbsp;&nbsp;&nbsp;码:</td>
					<td><input type="password" name="password" id="password" class="input" /></td>
				</tr>
				<tr>
					<td></td>
					<td><input type="button" name="btn_login" onclick="login()"
						value="登录" /></td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>